<template>
  <div class="introduce">
    <div class="title">房东介绍</div>
    <div class="server">
      <img :src="introduce.topScroll" alt="">
    </div>
    <div class="middle">
      <div class="img">
        <img :src="introduce.hotelLogo" alt="">
      </div>
      <div class="describe">
        <div class="top">{{ introduce.hotelName }}</div>
        <div class="bottom">
          <template v-for="(item, index) in introduce.hotelTags">
            <div class="item" :style="{ color: item.tagText.color }">
              <span style="font-size: 10px">{{ item.tagText.text }}</span>
              <span v-if="index !== introduce.hotelTags.length - 1" style="font-size: 10px;padding: 0 4px;">|</span>
            </div>
          </template>
        </div>
      </div>
      <div class="right">
        <div class="contact">联系房东</div>
      </div>
    </div>
    <div class="list">
      <template v-for="(val, i) in introduce.hotelSummary" :key="i">
        <div class="show">
          <div class="t1">{{ val.title }}</div>
          <div class="m1">{{ val.introduction }}</div>
          <div class="b1">{{ val.tip }}</div>
        </div>
      </template>
    </div>
    <div class="footer">查看房东主页</div>
  </div>
</template>
<script setup>
const props = defineProps(['introduce'])
</script>
<style lang="less" scoped>
.introduce {
  padding: 16px 16px 35px;
  background-color: #fff;
  position: relative;

  .title {
    font-weight: 700;
    font-size: 20px;
    color: rgb(51, 51, 51);
    text-align: justify;
    line-height: 24px;
    overflow: hidden;
    padding: 0 0 12px;
    margin-bottom: 8px;
    border-bottom: 2px solid #f7f9fb;
  }

  .server {
    img {
      width: 100%;
    }
  }

  .footer {
    color: rgb(255, 150, 69);
    position: absolute;
    right: 20px;
    line-height: 44px;
    color: #ff9645;
    font-size: 14px;
    font-weight: 600;

    &::after {
      content: '';
      display: inline-block;
      width: 6px;
      height: 6px;
      border-left: 1px solid rgb(255, 150, 69);
      border-bottom: 1px solid rgb(255, 150, 69);
      transform: rotate(223deg);
      margin-left: 8px;
    }
  }

  .middle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;

    .img {
      width: 54px;
      height: 54px;

      img {
        width: 100%;
      }
    }

    .contact {
      padding: 2px 5px;
      height: 24px;
      line-height: 24px;
      border-radius: 5px;
      padding: 0 12px;
      font-size: 12px;
      color: #fff;
      background-image: linear-gradient(90deg, #fa8c1d, #fcaf3f);
    }

    .describe {
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: space-between;

      .top {
        font-size: 16px;
        font-weight: 600;
      }

      .bottom {
        display: flex;
      }
    }
  }

  .right {
    width: 72px;
    margin-top: 6px;
  }

  .list {
    display: flex;
    justify-content: space-between;
    margin: 50px 10px 10px;

    .show {
      .t1 {
        color: #999;
        font-size: 12px;
      }

      .m1 {
        margin: 5px 0;
        font-size: 18px;
        font-weight: 700;
        color: #333;
      }

      .b1 {
        color: #666;
        font-size: 12px;
      }
    }
  }
}
</style>
